package com.fr.base.core.antlr;

import com.fr.base.core.antlr.collections.AST;

public class ASTPair
{
  public AST root;
  public AST child;

  public final void advanceChildToEnd()
  {
    while ((this.child != null) && (this.child.getNextSibling() != null))
      this.child = this.child.getNextSibling();
  }

  public ASTPair copy()
  {
    ASTPair localASTPair = new ASTPair();
    localASTPair.root = this.root;
    localASTPair.child = this.child;
    return localASTPair;
  }

  public String toString()
  {
    String str1 = (this.root == null) ? "null" : this.root.getText();
    String str2 = (this.child == null) ? "null" : this.child.getText();
    return "[" + str1 + "," + str2 + "]";
  }
}